<%@ attribute name="id" required="true" description="表单控件ID"%>
<%@ attribute name="defaultvalue" required="false" description="所有input和select表单。如果你不设置就保持原值，一旦设置就设为默认值。"%>
<%@ attribute name="triggerevent" required="false" description="当前支持2种属性值:blur:失去焦点的时候触发，change:当输入框里的值发生改变的时候触发"%>
<%@ attribute name="validatorgroup" required="false" description="一个页面的控件可以分成多个组，分开校验"%>
<%@ attribute name="isempty" required="false" description="是否可以为空"%>
<%@ attribute name="automodify" required="false" description="输入错误离开焦点的时候，自动修复错误:先给出提示然后，自动修复，目前只支持text、file、textarea三种类型"%>
<%@ attribute name="onempty" required="false" description="空时候的提示:可以为空，为空时候的提示。为空者不显示"%>
<%@ attribute name="onshow" required="false" description="显示时候的提示:为空者不显示"%>
<%@ attribute name="onfocus" required="false" description="获得焦点的提示:为空者不显示"%>
<%@ attribute name="oncorrect" required="false"  description="输入正确后的提示:当你焦点离开控件的时候，如果输入正确将出现该提示。为空者不显示"%>
<%@ attribute name="tipid" required="false" description="显示错误的容器ID:如果不自动构建提示层，表示提示成的ID号如果自动构建提示层，表示提示层相对的目标控件"%>
<%@ attribute name="tipcss" required="false" description="自动构建的提示层的样式:主要用于定位自动构建的提示层,例如：{'left':'10px','top':'1px','height':'20px','width':'250px'}"%>
<%@ attribute name="forcevalid" required="false" description="强制输入的值必须有效:是否把一个全角字符当做2个长度的参数"%>
<%@ attribute name="inputValidator" required="false" description="增加输入验证，只能添加一个，必须在主体哦里面用jsp:attribute添加"%>
<%@ attribute name="compareValidator" required="false" description="比较验证器" %>
<%@ attribute name="regexValidator" required="false" description="正则验证器" %>
<%@ attribute name="ajaxValidator" required="false" description="Ajax验证器" %>
<%@ attribute name="functionValidator" required="false" description="函数验证器" %>
<div id="${id}Tip" >
<script type="text/javascript" charset="utf-8">
$(document).ready(
function() {
	$("#${id}").formValidator({${empty validatorgroup?"":"validatorgroup:\""}${empty validatorgroup?"":validatorgroup}${empty validatorgroup?"":"\","}
		${empty isempty?"":"empty:"}${empty isempty?"":isempty}${empty isempty?"":","}
		${empty automodify?"":"automodify:"}${empty automodify?"":automodify}${empty automodify?"":","}
		${empty tipid?"":"tipid:\""}${empty tipid?"":tipid}${empty tipid?"":"\","}
		${empty tipcss?"":"tipcss:"}${empty tipcss?"":tipcss}${empty tipcss?"":","}
		${empty forcevalid?"":"forcevalid:"}${empty forcevalid?"":forcevalid}${empty forcevalid?"":","}
		${empty defaultvalue?"":"defaultvalue:\""}${empty defaultvalue?"":defaultvalue}${empty defaultvalue?"":"\","}
		${empty triggerevent?"":"triggerevent:\""}${empty triggerevent?"":triggerevent}${empty triggerevent?"":"\","}
        onshow :"${onshow}",onfocus : "${onfocus}",oncorrect : "${oncorrect}",onempty : "${onempty}"
        })${empty inputValidator?";":inputValidator}${empty compareValidator?";":compareValidator}${empty regexValidator?";":regexValidator}${empty ajaxValidator?";":ajaxValidator}${empty functionValidator?";":functionValidator};
})
</script>
</div>